<?php

include('ConnectBdd.php');

$req="SELECT dom.Libelle_Equipe eq1,Ext.Libelle_Equipe eq2,Score_Set1_Dom,Score_Set1_Ext,Score_Set2_Dom,Score_Set2_Ext,Score_Set3_Dom,Score_Set3_Ext,Score_Set4_Dom,Score_Set4_Ext,Score_Set5_Dom,Score_Set5_Ext,Date_Match,Libelle_Plage
FROM volley_equipe dom, volley_equipe ext, volley_match,volley_plage
WHERE dom.Id_Equipe=Id_Equipe_dom
and ext.Id_Equipe=Id_Equipe_ext
and volley_plage.Id_Plage=volley_match.Id_Plage";

?>

<html>
    <table border="1">
        <tr>
            <td>nom Equipe 1  </td>
            <td>nom equipe 2</td>
            <td>score set 1</td>
            <td>score set 2</td>
            <td>score set 3</td>
            <td>score set 4</td>
            <td>score set 5</td>
            <td>date</td>
            <td>plage</td>
        </tr>
     <?php
     
     $result = $connexion->query($req);
            while ($row=$result->fetch(PDO::FETCH_ASSOC)){
                echo "<tr>";
                echo "<td>" . $row['eq1'] . "</td>";
                echo "<td>" . $row['eq2'] . "</td>";
                echo "<td>" . $row['Score_Set1_Dom'] ."/". $row['Score_Set1_Ext'] ."</td>";
                echo "<td>" . $row['Score_Set2_Dom'] ."/". $row['Score_Set2_Ext'] ."</td>";
                echo "<td>" . $row['Score_Set3_Dom'] ."/". $row['Score_Set3_Ext'] ."</td>";
                echo "<td>" . $row['Score_Set4_Dom'] ."/". $row['Score_Set4_Ext'] ."</td>";
                echo "<td>" . $row['Score_Set5_Dom'] ."/". $row['Score_Set5_Ext'] ."</td>";
                echo "<td>" . $row['Date_Match'] . "</td>";
                echo "<td>" . $row['Libelle_Plage'] . "</td>";
                echo "</tr>";
            }
     
     
     ?>
        
    </table>
    
    
    
</html>